export default class map {
    static geolocation(pram, cb) {
        dd.device.geolocation.get({
            targetAccuracy: pram.targetAccuracy,
            coordinate: pram.coordinate,
            withReGeocode: pram.withReGeocode,
            onSuccess: function (result) {
                cb && cb(true, result);
            },
            onFail: function (err) { cb && cb(false, err); }
        });
    }
    static getlocate(pram, cb) {
        dd.biz.map.locate({
            latitude: pram.latitude,
            longitude: pram.longitude,
            onSuccess: function (result) {
                cb && cb(true, result);
            },
            onFail: function (err) {
                cb && cb(false, err);
            }
        });
    }
    static getpoisearch(pram, cb) {
        dd.biz.map.search({
            latitude: pram.latitude,
            longitude: pram.longitude,
            scope: 500,
            onSuccess: function (poi) {
                cb && cb(true, poi);
            },
            onFail: function (err) {
                cb && cb(false, err);
            }
        });
    }
    static getmapview(pram) {
        dd.biz.map.view({
            latitude: pram.latitude,
            longitude: pram.longitude,
            title: pram.title // 地址/POI名称
        });
    }
}